
function [ img]=read_deformed_img_slice_toolbox(patient);



for i=patient.ref:patient.scans;
    
    display(sprintf('Reading Deformed IMG; scan = %d of %d',i, patient.scans))
    folder_dvf=[patient.folder_elastix sprintf('/out_phase%d_phase%d',patient.ref,i)];
    
    
    img(i,:,:,:)=single(metaImageRead([folder_dvf '/result.0']));
   
end
